<?php
/*
 * 用户中心
 *
 */

class ChecksAction extends BaseAction{
	protected $staff_show;
	protected function _initialize(){
		parent::_initialize();
	}



	public function yzwhoisemail(){
		if($_GET){
			$Db_whoisemail = D('Domain_whoisemail');
			$condition['code'] = strval($_GET['code']);
		//	$condition['uid'] = intval($_GET['code_id']);
			$get_check_data =  $Db_whoisemail->field(true)->where($condition)->find();
			if(!empty($get_check_data)){
				$data['is_check'] = 1;
				$data['code'] = '';
				$data['mail_id'] = $get_check_data['mail_id'];
				$Db_whoisemail->data($data)->save();
				if($this->user_session['uid'] > 0){
					$this->assign('jumpUrl',U('Account/whoisemail'));
				}else{
					$this->assign('jumpUrl',U('Index/index'));
				}
				$this->success('验证成功。');

			}else{

				if($this->user_session['uid'] > 0){
					$this->assign('jumpUrl',U('Account/whoisemail'));
				}else{
					$this->assign('jumpUrl',U('Index/index'));
				}
				$this->success('该链接已失效。');
			}

		}

	}



}
